<#assign className = table.className>   
<#assign classNameLower = className?uncap_first>
<#list table.columns as column>
<#if column.htmlHidden>
<input type="hidden" id="id" name="id" value="{$${classNameLower}.${column.columnNameLower}}"/>
</#if>
</#list>


<div class="form-group">
<#list table.notHiddenColumns?chunk(2) as row>
	<div class="row">
<#list row as column>	
	
		<div class="col-md-2 col-xs-4">
		<label for="${column.columnNameLower}" class="control-label"><#if !column.nullable><span class="required">*</span></#if>{$Think.lang.${className}_${column.columnName}}</label>
		</div>
		
	<#if column.isDateColumn>
		<div class="col-md-3 col-xs-8 col-sm-8">
			<div class="input-group date form_date" data-date-format="dd/mm/yyyy">
			    <input type="text" class="form-control" id="${column.columnNameLower}" name="${column.columnNameLower}"
			       ${column.parslyValidateString}
			       data-parsley-trigger="focusout"
			       value="{$${classNameLower}.${column.columnNameLower}}"/>
				<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
				<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			</div>	
			<div id="${column.columnNameLower}Error">
				<label class="error"></label>
			</div>
		</div>
	<#elseif column.isTimestampColumn>
		<div class="col-md-3 col-xs-8 col-sm-8">	
			<div class="input-group date form_datetime" data-date-format="dd/mm/yyyy hh:ii">	
				<input type="text" class="form-control" id="${column.columnNameLower}" name="${column.columnNameLower}"
			       ${column.parslyValidateString}
			       data-parsley-trigger="focusout"
			       value="{$${classNameLower}.${column.columnNameLower}}"/>
			    <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
				<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			</div>
			<div id="${column.columnNameLower}Error">
				<label class="error"></label>
			</div>
		</div>
	
	<#else>
		<div class="col-md-3 col-xs-8 col-sm-8">	
		    <input type="text" class="form-control" id="${column.columnNameLower}" name="${column.columnNameLower}"
			       ${column.parslyValidateString}
			       data-parsley-trigger="focusout"
			       value="{$${classNameLower}.${column.columnNameLower}}"/>
			<label class="error"></label>
		</div>
	</#if>
		

</#list>
	</div>
</#list>
</div>
					<script>
						$("#${className}Form").parsley();
					
						$(".${className}Menu").addClass("active").closest("ul").parent().addClass("active open");
						$(document).ready(function(){
							$('${className}Form:checkbox').checkboxpicker();
						
					})
					</script>
